﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StartPage.aspx.cs" Inherits="_5._3._2_NorthWind_Task.StartPage" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:GridView ID="GridViewEmployees" runat="server" AutoGenerateColumns="False" DataSourceID="NorthwindEntityDataSource">
            <Columns>
                <asp:TemplateField HeaderText="First and Last Name">
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLinkNames" runat="server" 
                        NavigateUrl='<%# "DetailedView.aspx?EmployeeID=" + Eval("EmployeeID")%>'>
                            <%# Eval("FirstName") + " " + Eval("LastName") %>
                        </asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:EntityDataSource ID="NorthwindEntityDataSource" runat="server" ConnectionString="name=NorthwindEntities"
            DefaultContainerName="NorthwindEntities" EnableFlattening="False" EntitySetName="Employees">
        </asp:EntityDataSource>
    </div>
    </form>
</body>
</html>
